![]() |
Kinetis SDK API Reference Manual
1.0.0-beta
Freescale Semiconductor, Inc.
|
The section describes the programming interface of the LPUART HAL driver. More...
Data Structures | |
| struct | lpuart_idle_line_config_t |
| Structure for idle line configuration settings. More... | |
| struct | lpuart_status_t |
| Structure for all LPUART status flags. More... | |
| struct | lpuart_interrupt_config_t |
| LPUART interrupt configuration structure, default settings are 0 (disabled) More... | |
| struct | lpuart_config_t |
| LPUART configuration structure. More... | |
LPUART Common Configurations | |
| status_t | lpuart_hal_init (uint32_t lpuartInstance, const lpuart_config_t *config) |
| Initializes the LPUART controller (see lpuart_config_t struct for initialization details). More... | |
| status_t | lpuart_hal_set_baud_rate (uint32_t lpuartInstance, uint32_t sourceClockInHz, uint32_t desiredBaudRate) |
| Configures the LPUART baud rate. More... | |
| status_t | lpuart_hal_set_baud_rate_divisor (uint32_t lpuartInstance, uint32_t baudRateDivisor) |
| Sets the LPUART baud rate modulo divisor. More... | |
| status_t | lpuart_hal_configure_bit_count_per_char (uint32_t lpuartInstance, lpuart_bit_count_per_char_t bitCountPerChar) |
| Configures the number of bits per character in the LPUART controller In some LPUART instances, the user should disable the transmitter/receiver before calling this function. More... | |
| void | lpuart_hal_configure_parity_mode (uint32_t lpuartInstance, lpuart_parity_mode_t parityModeType) |
| Configures parity mode in the LPUART controller. More... | |
| status_t | lpuart_hal_configure_stop_bit_count (uint32_t lpuartInstance, lpuart_stop_bit_count_t stopBitCount) |
| Configures the number of stop bits in the LPUART controller. More... | |
| void | lpuart_hal_configure_tx_rx_inversion (uint32_t lpuartInstance, uint32_t rxInvert, uint32_t txInvert) |
| Configures the transmit and receive inversion control in the LPUART controller. More... | |
| void | lpuart_hal_enable_transmitter (uint32_t lpuartInstance) |
| Enables the LPUART transmitter. More... | |
| void | lpuart_hal_disable_transmitter (uint32_t lpuartInstance) |
| Disables the LPUART transmitter. More... | |
| bool | lpuart_hal_is_transmitter_enabled (uint32_t lpuartInstance) |
| Gets the LPUART transmitter enabled/disabled configuration. More... | |
| void | lpuart_hal_enable_receiver (uint32_t lpuartInstance) |
| Enables the LPUART receiver. More... | |
| void | lpuart_hal_disable_receiver (uint32_t lpuartInstance) |
| Disables the LPUART receiver. More... | |
| bool | lpuart_hal_is_receiver_enabled (uint32_t lpuartInstance) |
| Gets the LPUART receiver enabled/disabled configuration. More... | |
LPUART Interrupts and DMA | |
| void | lpuart_hal_configure_interrupts (uint32_t lpuartInstance, const lpuart_interrupt_config_t *interruptConfig) |
| Configures the LPUART module interrupts to enable/disable various interrupt sources. More... | |
| void | lpuart_hal_enable_break_detect_interrupt (uint32_t lpuartInstance) |
| Enables the break_detect_interrupt. More... | |
| void | lpuart_hal_disable_break_detect_interrupt (uint32_t lpuartInstance) |
| Disables the break_detect_interrupt. More... | |
| bool | lpuart_hal_is_break_detect_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the break_detect_interrupt enable. More... | |
| void | lpuart_hal_enable_rx_active_edge_interrupt (uint32_t lpuartInstance) |
| Enables the rx_active_edge_interrupt. More... | |
| void | lpuart_hal_disable_rx_active_edge_interrupt (uint32_t lpuartInstance) |
| Disables the rx_active_edge_interrupt. More... | |
| bool | lpuart_hal_is_rx_active_edge_interrupt_enabled (uint32_t lpuartInstance) |
| Enables the configuration of the rx_active_edge_interrupt. More... | |
| void | lpuart_hal_enable_tx_data_register_empty_interrupt (uint32_t lpuartInstance) |
| Enables the tx_data_register_empty_interrupt. More... | |
| void | lpuart_hal_disable_tx_data_register_empty_interrupt (uint32_t lpuartInstance) |
| Disables the tx_data_register_empty_interrupt. More... | |
| bool | lpuart_hal_is_tx_data_register_empty_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the tx_data_register_empty_interrupt enable. More... | |
| void | lpuart_hal_enable_transmission_complete_interrupt (uint32_t lpuartInstance) |
| Enables the transmission_complete_interrupt. More... | |
| void | lpuart_hal_disable_transmission_complete_interrupt (uint32_t lpuartInstance) |
| Disables the transmission_complete_interrupt. More... | |
| bool | lpuart_hal_is_transmission_complete_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the transmission_complete_interrupt enable. More... | |
| void | lpuart_hal_enable_rx_data_register_full_interrupt (uint32_t lpuartInstance) |
| Enables the rx_data_register_full_interrupt. More... | |
| void | lpuart_hal_disable_rx_data_register_full_interrupt (uint32_t lpuartInstance) |
| Disables the rx_data_register_full_interrupt. More... | |
| bool | lpuart_hal_is_receive_data_full_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the rx_data_register_full_interrupt enable. More... | |
| void | lpuart_hal_enable_idle_line_interrupt (uint32_t lpuartInstance) |
| Enables the idle_line_interrupt. More... | |
| void | lpuart_hal_disable_idle_line_interrupt (uint32_t lpuartInstance) |
| Disables the idle_line_interrupt. More... | |
| bool | lpuart_hal_is_idle_line_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the idle_line_interrupt enable. More... | |
| void | lpuart_hal_enable_rx_overrun_interrupt (uint32_t lpuartInstance) |
| Enables the rx_overrun_interrupt. More... | |
| void | lpuart_hal_disable_rx_overrun_interrupt (uint32_t lpuartInstance) |
| Disables the rx_overrun_interrupt. More... | |
| bool | lpuart_hal_is_rx_overrun_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the rx_overrun_interrupt enable. More... | |
| void | lpuart_hal_enable_noise_error_interrupt (uint32_t lpuartInstance) |
| Enables the noise_error_interrupt. More... | |
| void | lpuart_hal_disable_noise_error_interrupt (uint32_t lpuartInstance) |
| Disables the noise_error_interrupt. More... | |
| bool | lpuart_hal_is_noise_error_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the noise_error_interrupt enable. More... | |
| void | lpuart_hal_enable_framing_error_interrupt (uint32_t lpuartInstance) |
| Enables the framing_error_interrupt. More... | |
| void | lpuart_hal_disable_framing_error_interrupt (uint32_t lpuartInstance) |
| Disables the framing_error_interrupt. More... | |
| bool | lpuart_hal_is_framing_error_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the framing_error_interrupt enable. More... | |
| void | lpuart_hal_enable_parity_error_interrupt (uint32_t lpuartInstance) |
| Enables the parity_error_interrupt. More... | |
| void | lpuart_hal_disable_parity_error_interrupt (uint32_t lpuartInstance) |
| Disables the parity_error_interrupt. More... | |
| bool | lpuart_hal_is_parity_error_interrupt_enabled (uint32_t lpuartInstance) |
| Gets the configuration of the parity_error_interrupt enable. More... | |
| void | lpuart_hal_configure_dma (uint32_t lpuartInstance, bool txDmaConfig, bool rxDmaConfig) |
| LPUART configures DMA requests for Transmitter and Receiver. More... | |
| bool | lpuart_hal_is_txdma_enabled (uint32_t lpuartInstance) |
| Gets the LPUART Transmit DMA request configuration. More... | |
| bool | lpuart_hal_is_rxdma_enabled (uint32_t lpuartInstance) |
| Gets the LPUART receive DMA request configuration. More... | |
LPUART Transfer Functions | |
| void | lpuart_hal_putchar (uint32_t lpuartInstance, uint8_t data) |
| Sends the LPUART 8-bit character. More... | |
| void | lpuart_hal_putchar9 (uint32_t lpuartInstance, uint16_t data) |
| Sends the LPUART 9-bit character. More... | |
| status_t | lpuart_hal_putchar10 (uint32_t lpuartInstance, uint16_t data) |
| Sends the LPUART 10-bit character (Note: Feature available on select LPUART instances). More... | |
| void | lpuart_hal_getchar (uint32_t lpuartInstance, uint8_t *readData) |
| Gets the LPUART 8-bit character. More... | |
| void | lpuart_hal_getchar9 (uint32_t lpuartInstance, uint16_t *readData) |
| Gets the LPUART 9-bit character. More... | |
| status_t | lpuart_hal_getchar10 (uint32_t lpuartInstance, uint16_t *readData) |
| Gets the LPUART 10-bit character. More... | |
| void | lpuart_hal_idleconfig (uint32_t lpuartInstance, lpuart_idle_config_t idle_config) |
| Configures the number of idle characters that must be received before the IDLE flag is set. More... | |
| lpuart_idle_config_t | lpuart_hal_get_idleconfig (uint32_t lpuartInstance) |
| Gets the configuration of the number of idle characters that must be received before the IDLE flag is set. More... | |
LPUART Special Feature Configurations | |
| void | lpuart_hal_configure_wait_mode_operation (uint32_t lpuartInstance, lpuart_operation_config_t mode) |
| Configures the LPUART operation in wait mode (operates or stops operations in wait mode). More... | |
| lpuart_operation_config_t | lpuart_hal_get_wait_mode_operation_config (uint32_t lpuartInstance) |
| Gets the LPUART operation in wait mode (operates or stops operations in wait mode). More... | |
| void | lpuart_hal_configure_loopback_mode (uint32_t lpuartInstance, bool enable) |
| Configures the LPUART loopback operation (enable/disable loopback operation) In some LPUART instances, the user should disable the transmitter/receiver before calling this function. More... | |
| void | lpuart_hal_configure_singlewire_mode (uint32_t lpuartInstance, bool enable) |
| Configures the LPUART single-wire operation (enable/disable single-wire mode) In some LPUART instances, the user should disable the transmitter/receiver before calling this function. More... | |
| void | lpuart_hal_configure_txdir_in_singlewire_mode (uint32_t lpuartInstance, lpuart_singlewire_txdir_t direction) |
| Configures the LPUART transmit direction while in single-wire mode. More... | |
| status_t | lpuart_hal_put_receiver_in_standby_mode (uint32_t lpuartInstance) |
| Places the LPUART receiver in standby mode. More... | |
| void | lpuart_hal_put_receiver_in_normal_mode (uint32_t lpuartInstance) |
| Places the LPUART receiver in a normal mode (disable standby mode operation). More... | |
| bool | lpuart_hal_is_receiver_in_standby (uint32_t lpuartInstance) |
| Checks whether the LPUART receiver is in a standby mode. More... | |
| void | lpuart_hal_select_receiver_wakeup_method (uint32_t lpuartInstance, lpuart_wakeup_method_t method) |
| LPUART receiver wakeup method (idle line or addr-mark) from standby mode. More... | |
| lpuart_wakeup_method_t | lpuart_hal_get_receiver_wakeup_method (uint32_t lpuartInstance) |
| Gets the LPUART receiver wakeup method (idle line or addr-mark) from standby mode. More... | |
| void | lpuart_hal_configure_idle_line_detect (uint32_t lpuartInstance, const lpuart_idle_line_config_t *config) |
| LPUART idle-line detect operation configuration (idle line bit-count start and wake up affect on IDLE status bit). More... | |
| void | lpuart_hal_set_break_char_transmit_length (uint32_t lpuartInstance, lpuart_break_char_length_t length) |
| LPUART break character transmit length configuration In some LPUART instances, the user should disable the transmitter before calling this function. More... | |
| void | lpuart_hal_set_break_char_detect_length (uint32_t lpuartInstance, lpuart_break_char_length_t length) |
| LPUART break character detect length configuration. More... | |
| void | lpuart_hal_queue_break_char_to_send (uint32_t lpuartInstance, bool enable) |
| LPUART transmit send break character configuration. More... | |
| status_t | lpuart_hal_configure_match_address_operation (uint32_t lpuartInstance, bool matchAddrMode1, bool matchAddrMode2, uint8_t matchAddrValue1, uint8_t matchAddrValue2, lpuart_match_config_t config) |
| LPUART configure match address mode control (Note: Feature available on select LPUART instances) More... | |
| status_t | lpuart_hal_configure_send_msb_first_operation (uint32_t lpuartInstance, bool enable) |
| LPUART sends the MSB first configuration (Note: Feature available on select LPUART instances) In some LPUART instances, the user should disable the transmitter/receiver before calling this function. More... | |
| status_t | lpuart_hal_configure_receive_resync_disable_operation (uint32_t lpuartInstance, bool enable) |
| LPUART disables re-sync of received data configuration (Note: Feature available on select LPUART instances). More... | |
LPUART Status Flags | |
| void | lpuart_hal_get_all_status_flag (uint32_t lpuartInstance, lpuart_status_t *allStatusFlag) |
| LPUART get all status flag. More... | |
| bool | lpuart_hal_is_transmit_data_register_empty (uint32_t lpuartInstance) |
| Gets the LPUART transmit data register empty flag. More... | |
| bool | lpuart_hal_is_transmission_complete (uint32_t lpuartInstance) |
| Gets the LPUART transmission complete flag. More... | |
| bool | lpuart_hal_is_receive_data_register_full (uint32_t lpuartInstance) |
| Gets the LPUART receive data register full flag. More... | |
| bool | lpuart_hal_is_idle_line_detected (uint32_t lpuartInstance) |
| Gets the LPUART idle line detect flag. More... | |
| bool | lpuart_hal_is_receive_overrun_detected (uint32_t lpuartInstance) |
| Gets the LPUART receiver overrun status. More... | |
| bool | lpuart_hal_is_noise_detected (uint32_t lpuartInstance) |
| Gets the LPUART noise flag. More... | |
| bool | lpuart_hal_is_frame_error_detected (uint32_t lpuartInstance) |
| Gets the LPUART frame error flag. More... | |
| bool | lpuart_hal_is_parity_error_detected (uint32_t lpuartInstance) |
| Gets the LPUART parity error flag. More... | |
| bool | lpuart_hal_is_line_break_detected (uint32_t lpuartInstance) |
| Gets the LPUART LIN break detect interrupt flag. More... | |
| bool | lpuart_hal_is_receive_active_edge_detected (uint32_t lpuartInstance) |
| Gets the LPUART receive pin active edge interrupt flag. More... | |
| bool | lpuart_hal_is_receiver_active (uint32_t lpuartInstance) |
| Gets LPUART Receiver Active Flag (RAF). More... | |
| status_t | lpuart_hal_clear_status_flag (uint32_t lpuartInstance, lpuart_status_flag_t statusFlag) |
| LPUART clears an individual status flag (see lpuart_status_flag_t for list of status bits). More... | |
| void | lpuart_hal_clear_all_non_autoclear_status_flags (uint32_t lpuartInstance) |
| LPUART clears ALL status flags. More... | |
| struct lpuart_idle_line_config_t |
Data Fields | |
| unsigned | idleLineType: 1 |
| ILT, Idle bit count start: 0 - after start bit (default),. | |
| unsigned | rxWakeIdleDetect: 1 |
| 1 - after stop bit More... | |
| unsigned lpuart_idle_line_config_t::rxWakeIdleDetect |
RWUID, Receiver Wake Up Idle Detect. IDLE status bit
| struct lpuart_status_t |
Data Fields | |
| unsigned | transmitDataRegisterEmpty: 1 |
| Transmit data register empty flag, sets when. | |
| unsigned | transmissionComplete: 1 |
| transmit buffer is empty More... | |
| unsigned | receiveDataRegisterFull: 1 |
| is idle (transmission activity complete) More... | |
| unsigned | idleLineDetect: 1 |
| receive data buffer is full More... | |
| unsigned | receiveOverrun: 1 |
| Receiver Overrun sets when new data is received. | |
| unsigned | noiseDetect: 1 |
| before data is read from receive register More... | |
| unsigned | frameError: 1 |
| If any of these samples differ, noise flag sets. More... | |
| unsigned | parityError: 1 |
| where stop bit expected More... | |
| unsigned | lineBreakDetect: 1 |
| error detection More... | |
| unsigned | receiveActiveEdgeDetect: 1 |
| LIN break char detected and LIN circuit enabled. More... | |
| unsigned | receiverActive: 1 |
| when active edge detected More... | |
| unsigned lpuart_status_t::transmissionComplete |
Transmission complete flag, sets when transmitter
| unsigned lpuart_status_t::receiveDataRegisterFull |
Receive data register full flag, sets when the
| unsigned lpuart_status_t::idleLineDetect |
Idle line detect flag, sets when idle line detected
| unsigned lpuart_status_t::noiseDetect |
Receiver takes 3 samples of each received bit.
| unsigned lpuart_status_t::frameError |
Frame error flag, sets if logic 0 was detected
| unsigned lpuart_status_t::parityError |
If parity enabled, will set upon parity
| unsigned lpuart_status_t::lineBreakDetect |
LIN break detect interrupt flag, sets when
| unsigned lpuart_status_t::receiveActiveEdgeDetect |
Receive pin active edge interrupt flag, sets
| unsigned lpuart_status_t::receiverActive |
Receiver Active Flag (RAF), sets a beginning of
| struct lpuart_interrupt_config_t |
Data Fields | |
| unsigned | linBreakDetect: 1 |
| LIN break detect: 0 - disable interrupt,. | |
| unsigned | rxActiveEdge: 1 |
| 1 - enable interrupt More... | |
| unsigned | transmitDataRegisterEmpty: 1 |
| 1 - enable interrupt More... | |
| unsigned | transmitComplete: 1 |
| 0 - disable interrupt, 1 - enable interrupt More... | |
| unsigned | receiverDataRegisterFull: 1 |
| 1 - enable interrupt More... | |
| unsigned | idleLine: 1 |
| 0 - disable interrupt, 1 - enable interrupt More... | |
| unsigned | receiverOverrun: 1 |
| Receiver Overrun: 0 - disable interrupt,. | |
| unsigned | noiseErrorFlag: 1 |
| 1 - enable interrupt More... | |
| unsigned | frameErrorFlag: 1 |
| 1 - enable interrupt More... | |
| unsigned | parityErrorFlag: 1 |
| 1 - enable interrupt More... | |
| unsigned lpuart_interrupt_config_t::rxActiveEdge |
RX Active Edge: 0 - disable interrupt,
| unsigned lpuart_interrupt_config_t::transmitDataRegisterEmpty |
Transmit data register empty:
| unsigned lpuart_interrupt_config_t::transmitComplete |
Transmission complete: 0 - disable interrupt,
| unsigned lpuart_interrupt_config_t::receiverDataRegisterFull |
Receiver data register full:
| unsigned lpuart_interrupt_config_t::idleLine |
Idle line: 0 - disable interrupt, 1 - enable interrupt
| unsigned lpuart_interrupt_config_t::noiseErrorFlag |
Noise error flag: 0 - disable interrupt,
| unsigned lpuart_interrupt_config_t::frameErrorFlag |
Framing error flag: 0 - disable interrupt,
| unsigned lpuart_interrupt_config_t::parityErrorFlag |
Parity error flag: 0 - disable interrupt,
| struct lpuart_config_t |
Data Fields | |
| uint32_t | lpuartSourceClockInHz |
| LPUART module source clock in Hertz. | |
| uint32_t | baudRate |
| LPUART baud rate. | |
| lpuart_parity_mode_t | parityMode |
| parity mode, disabled (default), even, odd | |
| lpuart_stop_bit_count_t | stopBitCount |
| number of stop bits, 1 stop bit (default) | |
| lpuart_bit_count_per_char_t | bitCountPerChar |
| or 2 stop bits More... | |
| unsigned | rxDataInvert: 1 |
| in a word (up to 10-bits in More... | |
| unsigned | txDataInvert: 1 |
| 1 - inverted More... | |
| lpuart_bit_count_per_char_t lpuart_config_t::bitCountPerChar |
number of bits, 8-bit (default) or 9-bit
| unsigned lpuart_config_t::rxDataInvert |
some LPUART instances) Receive Data Inversion: 0 - not inverted (default),
| unsigned lpuart_config_t::txDataInvert |
Transmit Data Inversion: 0 - not inverted (default),
The actual maximum bit times may vary depending on the LPUART instance.
| enum lpuart_status_flag_t |
| enum lpuart_idle_config_t |
| enum lpuart_cts_source_t |
| enum lpuart_cts_config_t |
| status_t lpuart_hal_init | ( | uint32_t | lpuartInstance, |
| const lpuart_config_t * | config | ||
| ) |
| lpuartInstance | LPUART instance number. |
| config | LPUART configuration data. |
| status_t lpuart_hal_set_baud_rate | ( | uint32_t | lpuartInstance, |
| uint32_t | sourceClockInHz, | ||
| uint32_t | desiredBaudRate | ||
| ) |
In some LPUART instances the user must disable the transmitter/receiver before calling this function. Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number. |
| sourceClockInHz | LPUART source input clock in Hz. |
| desiredBaudRate | LPUART desired baud rate. |
| status_t lpuart_hal_set_baud_rate_divisor | ( | uint32_t | lpuartInstance, |
| uint32_t | baudRateDivisor | ||
| ) |
| lpuartInstance | LPUART instance number. |
| baudRateDivisor | The baud rate modulo division "SBR" |
| status_t lpuart_hal_configure_bit_count_per_char | ( | uint32_t | lpuartInstance, |
| lpuart_bit_count_per_char_t | bitCountPerChar | ||
| ) |
Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number. |
| bitCountPerChar | Number of bits per char (8, 9, or 10, depending on the LPUART instance) |
| void lpuart_hal_configure_parity_mode | ( | uint32_t | lpuartInstance, |
| lpuart_parity_mode_t | parityModeType | ||
| ) |
In some LPUART instances, the user should disable the transmitter/receiver before calling this function. Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number. |
| parityModeType | Parity mode (enabled, disable, odd, even - see parity_mode_t struct) |
| status_t lpuart_hal_configure_stop_bit_count | ( | uint32_t | lpuartInstance, |
| lpuart_stop_bit_count_t | stopBitCount | ||
| ) |
In some LPUART instances, the user should disable the transmitter/receiver before calling this function. Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number. |
| stopBitCount | Number of stop bits (1 or 2 - see lpuart_stop_bit_count_t struct) |
| void lpuart_hal_configure_tx_rx_inversion | ( | uint32_t | lpuartInstance, |
| uint32_t | rxInvert, | ||
| uint32_t | txInvert | ||
| ) |
This function should only be called when the LPUART is between transmit and receive packets.
| lpuartInstance | LPUART instance number. |
| rxInvert | Enable (1) or disable (0) receive inversion |
| txInvert | Enable (1) or disable (0) transmit inversion |
| void lpuart_hal_enable_transmitter | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number. |
| void lpuart_hal_disable_transmitter | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_transmitter_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_receiver | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_receiver | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receiver_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_configure_interrupts | ( | uint32_t | lpuartInstance, |
| const lpuart_interrupt_config_t * | interruptConfig | ||
| ) |
| lpuartInstance | LPUART instance number |
| interruptConfig | LPUART interrupt configuration data |
| void lpuart_hal_enable_break_detect_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_break_detect_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_break_detect_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_rx_active_edge_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_rx_active_edge_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number. |
| bool lpuart_hal_is_rx_active_edge_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_tx_data_register_empty_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_tx_data_register_empty_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_tx_data_register_empty_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_transmission_complete_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_transmission_complete_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_transmission_complete_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_rx_data_register_full_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_rx_data_register_full_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receive_data_full_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_idle_line_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_idle_line_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_idle_line_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_rx_overrun_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_rx_overrun_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_rx_overrun_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_noise_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_noise_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_noise_error_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_framing_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_framing_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_framing_error_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_enable_parity_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_disable_parity_error_interrupt | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_parity_error_interrupt_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_configure_dma | ( | uint32_t | lpuartInstance, |
| bool | txDmaConfig, | ||
| bool | rxDmaConfig | ||
| ) |
| lpuartInstance | LPUART instance number |
| txDmaConfig | Transmit DMA request configuration (enable:1 /disable: 0) |
| rxDmaConfig | Receive DMA request configuration (enable: 1/disable: 0) |
| bool lpuart_hal_is_txdma_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_rxdma_enabled | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_putchar | ( | uint32_t | lpuartInstance, |
| uint8_t | data | ||
| ) |
| lpuartInstance | LPUART Instance |
| data | data to send (8-bit) |
| void lpuart_hal_putchar9 | ( | uint32_t | lpuartInstance, |
| uint16_t | data | ||
| ) |
| lpuartInstance | LPUART Instance |
| data | data to send (9-bit) |
| status_t lpuart_hal_putchar10 | ( | uint32_t | lpuartInstance, |
| uint16_t | data | ||
| ) |
| lpuartInstance | LPUART Instance |
| data | data to send (10-bit) |
| void lpuart_hal_getchar | ( | uint32_t | lpuartInstance, |
| uint8_t * | readData | ||
| ) |
| lpuartInstance | LPUART instance number |
| readData | data read from receive (8-bit) |
| void lpuart_hal_getchar9 | ( | uint32_t | lpuartInstance, |
| uint16_t * | readData | ||
| ) |
| lpuartInstance | LPUART instance number |
| readData | data read from receive (9-bit) |
| status_t lpuart_hal_getchar10 | ( | uint32_t | lpuartInstance, |
| uint16_t * | readData | ||
| ) |
| lpuartInstance | LPUART instance number |
| readData | data read from receive (10-bit) |
| void lpuart_hal_idleconfig | ( | uint32_t | lpuartInstance, |
| lpuart_idle_config_t | idle_config | ||
| ) |
| lpuartInstance | LPUART instance number |
| idle_config | idle characters configuration |
| lpuart_idle_config_t lpuart_hal_get_idleconfig | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_configure_wait_mode_operation | ( | uint32_t | lpuartInstance, |
| lpuart_operation_config_t | mode | ||
| ) |
In some LPUART instances, the user should disable the transmitter/receiver before calling this function. Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| mode | LPUART wait mode operation - operates or stops to operate in wait mode. |
| lpuart_operation_config_t lpuart_hal_get_wait_mode_operation_config | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_configure_loopback_mode | ( | uint32_t | lpuartInstance, |
| bool | enable | ||
| ) |
Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| enable | LPUART loopback mode - disabled (0) or enabled (1) |
| void lpuart_hal_configure_singlewire_mode | ( | uint32_t | lpuartInstance, |
| bool | enable | ||
| ) |
Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| enable | LPUART loopback mode - disabled (0) or enabled (1) |
| void lpuart_hal_configure_txdir_in_singlewire_mode | ( | uint32_t | lpuartInstance, |
| lpuart_singlewire_txdir_t | direction | ||
| ) |
| lpuartInstance | LPUART instance number |
| direction | LPUART single-wire transmit direction - input or output |
| status_t lpuart_hal_put_receiver_in_standby_mode | ( | uint32_t | lpuartInstance | ) |
In some LPUART instances, before placing LPUART in standby mode, first determine whether the receiver is set to wake on idle or whether it is already in idle state. NOTE that the RWU should only be set with C1[WAKE] = 0 (wakeup on idle) if the channel is currently not idle. This can be determined by the S2[RAF] flag. If it is set to wake up an IDLE event and the channel is already idle, it is possible that the LPUART will discard data since data must be received (or a LIN break detect) after an IDLE is detected and before IDLE is allowed to reasserted.
| lpuartInstance | LPUART instance number |
| void lpuart_hal_put_receiver_in_normal_mode | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receiver_in_standby | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_select_receiver_wakeup_method | ( | uint32_t | lpuartInstance, |
| lpuart_wakeup_method_t | method | ||
| ) |
| lpuartInstance | LPUART instance number |
| method | LPUART wakeup method: 0 - Idle-line wake (default), 1 - addr-mark wake |
| lpuart_wakeup_method_t lpuart_hal_get_receiver_wakeup_method | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| void lpuart_hal_configure_idle_line_detect | ( | uint32_t | lpuartInstance, |
| const lpuart_idle_line_config_t * | config | ||
| ) |
In some LPUART instances, the user should disable the transmitter/receiver before calling this function. Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| config | LPUART configuration data for idle line detect operation |
| void lpuart_hal_set_break_char_transmit_length | ( | uint32_t | lpuartInstance, |
| lpuart_break_char_length_t | length | ||
| ) |
Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| length | LPUART break character length setting: 0 - minimum 10-bit times (default), 1 - minimum 13-bit times |
| void lpuart_hal_set_break_char_detect_length | ( | uint32_t | lpuartInstance, |
| lpuart_break_char_length_t | length | ||
| ) |
| lpuartInstance | LPUART instance number |
| length | LPUART break character length setting: 0 - minimum 10-bit times (default), 1 - minimum 13-bit times |
| void lpuart_hal_queue_break_char_to_send | ( | uint32_t | lpuartInstance, |
| bool | enable | ||
| ) |
| lpuartInstance | LPUART instance number |
| enable | LPUART normal/queue break char - disabled (normal mode, default: 0) or enabled (queue break char: 1) |
| status_t lpuart_hal_configure_match_address_operation | ( | uint32_t | lpuartInstance, |
| bool | matchAddrMode1, | ||
| bool | matchAddrMode2, | ||
| uint8_t | matchAddrValue1, | ||
| uint8_t | matchAddrValue2, | ||
| lpuart_match_config_t | config | ||
| ) |
| lpuartInstance | LPUART instance number |
| matchAddrMode1 | MAEN1: match address mode1 enable (1)/disable (0) |
| matchAddrMode2 | MAEN2: match address mode2 enable (1)/disable (0) |
| matchAddrValue1 | MA: match address value to program into match address register 1 |
| matchAddrValue2 | MA: match address value to program into match address register 2 |
| config | MATCFG: Configures the match addressing mode used. |
| status_t lpuart_hal_configure_send_msb_first_operation | ( | uint32_t | lpuartInstance, |
| bool | enable | ||
| ) |
Generally, this may be applied to all LPUARTs to ensure safe operation.
| lpuartInstance | LPUART instance number |
| enable | MSB first mode configuration, MSBF: 0 - LSB (default, feature disabled), 1 - MSB (feature enabled) |
| status_t lpuart_hal_configure_receive_resync_disable_operation | ( | uint32_t | lpuartInstance, |
| bool | enable | ||
| ) |
| lpuartInstance | LPUART instance number |
| enable | disable re-sync of received data word configuration, RESYNCDIS: 0 - re-sync of received data word (default, feature disabled), 1 - disable the re-sync (feature enabled) |
| void lpuart_hal_get_all_status_flag | ( | uint32_t | lpuartInstance, |
| lpuart_status_t * | allStatusFlag | ||
| ) |
| lpuartInstance | LPUART instance number |
| allStatusFlag | Structure of status of all LPUART status flags |
| bool lpuart_hal_is_transmit_data_register_empty | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_transmission_complete | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receive_data_register_full | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_idle_line_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receive_overrun_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_noise_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_frame_error_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_parity_error_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_line_break_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receive_active_edge_detected | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| bool lpuart_hal_is_receiver_active | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |
| status_t lpuart_hal_clear_status_flag | ( | uint32_t | lpuartInstance, |
| lpuart_status_flag_t | statusFlag | ||
| ) |
| lpuartInstance | LPUART instance number |
| statusFlag | Desired LPUART status flag to clear |
| void lpuart_hal_clear_all_non_autoclear_status_flags | ( | uint32_t | lpuartInstance | ) |
| lpuartInstance | LPUART instance number |